home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
426-450
/
disk_429
/
uedit-stuff
/
printing
< prev
next >
Wrap
Text File
|
1992-05-06
|
5KB
|
112 lines
These here are modified printing commands that I use. Others might want
something similar. The four choices in alt-p are those that were most useful
to me. My printer is set up to use letter quality by default; the indent
option is for letters, with lineLenth = 60. Others may want options for
elite pitch, eight lines per inch, or such like. If you want to print
without any of those special features, just press any other key.
Since alt-p used to be "select printer port", that's moved to shftAlt-p here.
CAUTION: USING "CMD" TO REDIRECT THIS THING'S OUTPUT MAY RESULT IN VOMITING,
CONVULSIONS, UNCONCIOUSNESS, HALLUCINATIONS, OR VOTING REPUBLICAN! Don't say
you haven't been warned. (It looks rather like the CMD process and Uedit are
getting into a deadly embrace.)
Print buffer, asking whether draft, etc; add final formfeed
<alt-p: putMsg("F1 = draft, F5 = justified proportional, F10 = 1\" indent") .."
freeBuf(buf54)
.. the printerCode sequences don't work if this is the first print job
.. done immediately after the printer.device is loaded, cause it somehow gets
.. all tangled up in the initialization sequence the driver sends. At least
.. with my printer it does. So we need some padding:
do (n54,1,69) insertChar(buf54, 0)
getKey(n54)
if (eqNum(n54, 80))
printerCode(buf54, 26, 0, 0) .. draft mode
else if (eqNum(n54, 84)) {
printerCode(buf54, 65, 11, 70) .. centered sixty char line
printerCode(buf54, 45, 0, 0) .. proportional spacing
printerCode(buf54, 51, 0, 0) .. full justify on
} else if (eqNum(n54, 89))
printerCode(buf54, 65, 11, 223) .. ten space left margin
runKey(virtual-k)
print(curFile, all)
if (eqNum(n54, 80))
printerCode(buf54, 25, 0, 0)
else if (eqNum(n54, 84))
printerCode(buf54, 1, 0, 0)
else if (eqNum(n54, 89))
printerCode(buf54, 65, 0, 223)
equateLoc(curFile, mouseLoc, atCursor)
equateLoc(curFile, atCursor, eFile)
moveCursor(curFile, sChar)
if (not is(curFile, formFeed))
insertChar(buf54, 12)
runKey(virtual-k)
equateLoc(curFile, atCursor, mouseLoc)
>
I think I could use something like that for just the hilite region.
** needs to remember the sPage location.
Select printing port: parallel, serial, Preferences raw or processed.
<shftAlt-p: putMsg("Printer select: 0=PAR: 1=SER: 2=PRT: 3=PRT:RAW")
getKeyVal(macroNum,inputChar)
sub(n54,inputChar,"0")
if (geNum(n54,0)) if (gtNum(4,n54)) equateNum(prefPrint,n54)
putMsg(" ") >
Print entire document without initialization or added formfeed at end
<altCtl-p: print(curFile,all)>
Print a printerCode sequence in buf54 and then free it
<virtual-k: equateNum(n52, prefPrint)
equateNum(prefPrint, 2)
print(buf54, all)
equateNum(prefPrint, n52)
freeBuf(buf54) >
Initialize the printer to the default state
<rAmiga-p: freeBuf(buf54)
printerCode(buf54, 1, 0, 0)
runKey(virtual-k) >
Give printer control code help
<shftAltCtl-p: freeBuf(buf54)
insertRgn(buf54,sFile,
"Press lAmiga-p and then one of the letters below. For boldface, italics,
8 lines/inch, etc, the hilite region is bracketed with printer codes:
i = italics e = elite n = NLQ
u = underline l = enlarged x = superscript
b = boldface s = shadow y = subscript
c = condensed d = double strike 8 = 8 lines/inch
rAmiga-g = find next printer code in document
lAmiga-g = input a printer code # (0-75. See table in Manual.)
\"Print select\" must be 2 or 3 for these codes to control your printer.
Select \"Show vals\" to see what print-select is. Select your printer in
Preferences. Here are some other printer codes:
0 = reset (sets TOF) 45 = proportional spacing
1 = initialize to default state 46 = fixed width spacing
15 = elite spacing 48 = set proportional offset
17 = condensed spacing 51 = auto justify margins
25 = letter quality 52 = turn off auto justify
26 = draft mode 65 = set margins
",all)
flipFlag(buf54,readOnly)
equateNum(n53,curFile)
editBuf(buf54)
vScroll(sFile)
putMsg(" press any key ")
updateDisplay
getKey(n54)
editBuf(buf[n53])
freeBuf(buf54)
putmsg(" ") >